package caches

import "github.com/go-redis/redis/v8"

var (
	Rdb *redis.Client
)

type RedisConfig struct {
	Address  string
	Password string
	DB       int
}

func New(cfg *RedisConfig) {
	Rdb = redis.NewClient(&redis.Options{
		Addr:     cfg.Address,
		Password: cfg.Password, // no password set
		DB:       cfg.DB,       // use default DB
	})
}
